package edu.ustc.iproject.service.impl;

import java.util.List;

import edu.ustc.iproject.dao.CompanyDAO;
import edu.ustc.iproject.dao.NoteDAO;
import edu.ustc.iproject.dao.impl.CompanyDAOImpl;
import edu.ustc.iproject.dao.impl.NoteDAOImpl;
import edu.ustc.iproject.bean.Note; 
import edu.ustc.iproject.service.NoteService; 


public class NoteServiceImpl implements NoteService {

	public Note getSingleNoteById(int note_id) {
		
		NoteDAO noteDAO = new NoteDAOImpl();
		return noteDAO.getSingleNoteById(note_id); 
		
	}

	public List<Note> listAllNotes() {
   
		NoteDAO noteDAO = new NoteDAOImpl();
		return noteDAO.listAllNotes();
	}

	public void removeNote(int note_id) {
		NoteDAO noteDAO = new NoteDAOImpl();
		noteDAO.removeNote(note_id);
		
	}

	public void saveNote(Note note) {
		NoteDAO noteDAO = new NoteDAOImpl();
		noteDAO.saveNote(note);
		
	}

	public void updateNote(Note note) {
		NoteDAO noteDAO = new NoteDAOImpl();
		noteDAO.updateNote(note);
		
	}

}
